package com.zhzh.sc.demo.proxy;

public class ProxyTest {

    public static int test() {
        int[] i = new int[1];
        try{
            i[0]=1;
            return i[0];
        }catch (Exception e){

        }finally {
            i[0] = 2;
            return i[0];
        }
    }
    public static void main(String[] args) throws NoSuchMethodException {
        System.out.println(test());
//        Method[] methods = ProxyTest.class.getMethods();
//        Proxy.newProxyInstance(ProxyTest.class.getClassLoader(), ProxyTest.class.getMethod("main", String.class), new InvocationHandler() {
//            @Override
//            public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
//                return null;
//            }
//
//        });
    }
}
